<template>

  
  <van-popup v-model:show="show"
  closeable
  close-icon="close" position="bottom" close-icon-position="top-right" :style="{ height: '30%' }">
    <div class="releaseBox" >
        <span @click="releaseone"><img src="../../assets/img/矢量智能对象 拷贝 8@2x(1).png"  alt=""> 发供应</span>
        <span @click="releasetwo"><img src="../../assets/img/矢量智能对象 拷贝 7@2x.png"  alt=""> 发采购</span>
    </div>
  </van-popup>

  <router-view />
    <van-tabbar v-model="active">
      <van-tabbar-item icon="home-o" to="/index">首页</van-tabbar-item>
      <van-tabbar-item icon="apps-o" to="/classify">分类</van-tabbar-item>
      <van-tabbar-item icon="edit" @click="showPopup">发布</van-tabbar-item>
      <van-tabbar-item icon="orders-o" to="/shippinglist">货单</van-tabbar-item>
      <van-tabbar-item icon="user-o" to="/mine">我的</van-tabbar-item>
    </van-tabbar>
</template>

<script>
import { ref } from 'vue';
import router from '../../router/index.js'


export default {
  setup(){
    const active = ref(0);
    const show = ref(false);
    const showPopup = () => {
      show.value = true;
    };
    const releaseone = ()=>{
      router.push('/releaseone');
    };
    const releasetwo = ()=>{
      router.push('/releasetwo');
    }
    return {active,showPopup,show,releaseone,releasetwo};
    
  }
};
</script>
<style scoped>
  .releaseBox{
    width:100%;
    height: 100%;
    display: flex;
    flex-direction: row;
    justify-content: space-evenly;
    align-items: center;
    border-top: 1px solid gray;
    font-size: 16px;
  }
  .releaseBox span{
    display:flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
  }
  .releaseBox img{
    width: 80px;
    height: 80px;
    margin-bottom: 10px;
  }

</style>
